package com.xu.createThread;

/**
 * 继承Thread类 重写run方法
 */
public class Thread1 extends Thread{

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println("子线程"+Thread.currentThread().getName());
        }
    }
    public static void main(String[] args) {
        Thread1 a  = new Thread1();
        Thread1 b  = new Thread1();
        a.start();
        b.start();
    }
}
